package com.sky.entity;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDate;

/**
 * 数据概览
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ExcelIgnoreUnannotated  //自动忽没加@ExcelProperty注解的字段
public class BusinessData implements Serializable {
    private Long id;
    @ColumnWidth(value =16)
    @ExcelProperty(value = "日期",index = 0)
    private LocalDate today;//当天日期
    @ExcelProperty(value = "营业额",index = 1)
    private Double turnover;//营业额
    @ExcelProperty(value = "有效订单数",index = 2)
    private Integer validOrderCount;//有效订单数
    @ExcelProperty(value = "订单总数",index = 3)
    private Integer orderCount;//订单总数
    @ExcelProperty(value = "订单完成率",index = 4)
    private Double orderCompletionRate;//订单完成率
    @ExcelProperty(value = "新增用户数",index = 5)
    private Integer newUsers;//新增用户数
    @ExcelProperty(value = "平均客单价",index = 6)
    private Double unitPrice;//平均客单价
}
